/*
 * @Author: NaturalHulk 2066634567@qq.com
 * @Date: 2024-02-04 11:57:49
 * @LastEditors: NaturalHulk 2066634567@qq.com
 * @LastEditTime: 2024-02-05 09:39:39
 * @FilePath: /wms/src/api/device/equipment.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "@/utils/request";

// 列表
export function GetListAPI(params) {
  return request({
    url: "/system/device/list",
    method: "GET",
    params,
  });
}
// 采集
export function GetCollectLogListAPI(params) {
  return request({
    url: "/pureut-tdstorage/collectLog/list",
    method: "GET",
    params,
  });
}
// 新增
export function AddDataAPI(data) {
  return request({
    url: "/system/device/add",
    method: "POST",
    data,
  });
}

// 修改
export function EditDataAPI(data) {
  return request({
    url: "/system/device/edit",
    method: "POST",
    data,
  });
}

// 删除
export function DelDataAPI(data) {
  return request({
    url: "/system/device/remove/" + data,
    method: "DELETE",
  });
}

// 详情
export function GetViewAPI(val) {
  return request({
    url: "/system/device/view",
    method: "GET",
    params: { id: val },
  });
}

// 部门
export function GetDeptPI(val) {
  return request({
    url: "/system/device/dept/treeselect",
    method: "GET",
  });
}

/**
 * 获取大屏打印信息
 * @param {*} id
 * @returns
 */
export function GetPrintInfoAPI(id) {
  return request({
    url: "/pureut-system/device/printInfo/" + id,
    method: "GET",
  });
}

// 物模型 ------------SAT---------------->

/**
 * 新增数据类型接口
 * @param {*} val
 * @returns
 */
export function AddModeDataAPI(data) {
  return request({
    url: "/pureut-equipment/dataMode/add",
    method: "POST",
    data,
  });
}

/**
 * 获取数据类型接口
 * @param {*} val
 * @returns
 */
export function GetDataTypeDdlAPI(val) {
  return request({
    url: "/pureut-equipment/dataMode/dataTypeDdl",
    method: "GET",
  });
}

/**
 * 获取数据列表查询
 * @param {*} val
 * @returns
 */
export function GetDataModeListAPI(params) {
  return request({
    url: "/pureut-equipment/dataMode/list",
    method: "GET",
    params,
  });
}

/**
 * 回显
 * @param {*} val
 * @returns
 */
export function GetDataModeViewAPI(id) {
  return request({
    url: "/pureut-equipment/dataMode/" + id,
    method: "GET",
  });
}

/**
 * 物模型修改
 * @param {*} val
 * @returns
 */
export function EditDataModeAPI(data) {
  return request({
    url: "/pureut-equipment/dataMode/edit",
    method: "PUT",
    data,
  });
}

/**
 * 物模型删除
 * @param {*} val
 * @returns
 */
export function DelDataModeAPI(id) {
  return request({
    url: "/pureut-equipment/dataMode/" + id,
    method: "DELETE",
  });
}

/**
 * 设备类型下拉
 */
export function GetDeviceTypeAPI(id) {
  return request({
    url: "/system/deviceType/ddl",
    method: "GET",
  });
}



/**
 * 设备升温状态
 */
export function GetWarmingAPI(data) {
  return request({
    url: "/pureut-system/device/warming",
    method: "PUT",
    data
  });
}


// 物模型 ------------END---------------->
